#!/sbin/openrc-run

# fallback values for /etc/conf.d/ombi
: ${command_user:=ombi:ombi}
: ${umask:=0002}
: ${storage_directory:=/var/lib/ombi}
: ${port:=3579}

name=ombi
description="Ombi daemon"
command="/usr/lib/ombi/Ombi"
command_args="--storage $storage_directory --host http://*:$port"
command_background=true
directory=/usr/lib/ombi
pidfile="/run/$RC_SVCNAME.pid"

depend() {
	need net
	use dns logger netmount
}

start_pre() {
	checkpath -d -o "$command_user" "$directory"
}
